package com.zkthink.ceres.finance.dao;

import com.zkthink.base.mapper.SuperMapper;
import com.zkthink.ceres.finance.dto.MemberCashOutAuditDTO;
import com.zkthink.ceres.finance.entity.MemberCashOutDetail;
import com.zkthink.ceres.finance.vo.MemberCashOutDetailVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MemberCashOutDetailMapper extends SuperMapper<MemberCashOutDetail> {

    /**
     * 提现明细分页total
     *
     * @param startTime
     * @param endTime
     * @return
     */
    Integer getTotalOfMemberCashOutDetailPage(@Param("startTime") String startTime, @Param("endTime") String endTime);

    /**
     * 提现明细list
     *
     * @param startTime
     * @param endTime
     * @param page
     * @param size
     * @return
     */
    List<MemberCashOutDetailVO> findMemberCashOutDetailPage(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("page") long page, @Param("size") long size);

    /**
     * 提现审核分页 total
     *
     * @param nickName
     * @param mid
     * @param applyTimeString
     * @param auditStatus
     * @return
     */
    Integer getTotalOfAuditMemberCashOutDetailPage(@Param("nickName") String nickName, @Param("mid") Long mid, @Param("applyTimeString") String applyTimeString, @Param("auditStatus") Integer auditStatus);

    /**
     * 提现审核分页 list
     *
     * @param nickName
     * @param mid
     * @param applyTimeString
     * @param auditStatus
     * @param page
     * @param size
     * @return
     */
    List<MemberCashOutAuditDTO> findAuditMemberCashOutDetailPage(@Param("nickName") String nickName, @Param("mid") Long mid, @Param("applyTimeString") String applyTimeString, @Param("auditStatus") Integer auditStatus, @Param("page") long page, @Param("size") long size);

    /**
     * 获取提现审核
     *
     * @param id
     * @return
     */
    MemberCashOutAuditDTO getMemberCashOutAudit(@Param("id") Long id);

    /**
     * 更新提现申请 审核通过状态
     *
     * @param id
     */
    void updateAuditMemberSuccess(@Param("id") Long id);

    /**
     * 查询提现明细
     *
     * @param id
     * @return
     */
    MemberCashOutDetail getMemberCashOutDetail(@Param("id") Long id);

    /**
     * 查询提现中金额
     *
     * @return
     */
    Long getMemberCashOutApplyMoney(Long mid);
}
